package com.compass.mobile.doctor

import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity

class MyActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?){
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_my_main)
//
//        Toast.makeText(this,"请从移动爱家健康APP进入",Toast.LENGTH_SHORT).show()
//        finish()


        Handler(Looper.getMainLooper()).postDelayed({

            var userToken = "3f98becde6d24ed7ba0e133ca558e5f9"  //测试token

            val url = "native://zhyl/patient?token=${userToken}"
            val intent = Intent(Intent.ACTION_VIEW)
            intent.setData(Uri.parse(url))
            startActivity(intent)
            this.finish()

        },500)



    }
}
